def print_table(list_of_lists):
    columns = len(list_of_lists)
    rows = len(list_of_lists[0])

    width_of_each_column = [0] * columns

    for i in range(columns):
        max_length = max(map(len, list_of_lists[i]))
        width_of_each_column[i] = max_length
    
    for i in range(rows):
        
        for j in range(columns):
            print(list_of_lists[j][i].rjust(width_of_each_column[j]), end=' ')
        
        print('')


table_data = [  ['apples', 'oranges', 'cherries', 'banana'],
                ['Alice', 'Bob', 'Carol', 'David'],
                ['dogs', 'cats', 'moose', 'goose']	]

print_table(table_data)
